<!DOCTYPE html>
<html>

<head>
	<title>Online Store Register</title>
	<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>
	<header>
		<h2>Online Store</h2>
	</header>
	<main>
		<div class="content narrowbox">
			<h2>Customer Register</h2>
			<hr>
			<!--display result-->
			<p class="infotext">
				<?php
				include "connectStoreDB.php";

				$pwd = $_POST["pwd"];
				$cpwd = $_POST["cpwd"];

				if ($pwd == $cpwd) {
					$sql = "INSERT INTO customers(customer_pass) VALUES('$pwd')";
					mysqli_query($conn, $sql);
					echo "Registration Successful!<br><br>Go to <a href='LoginPage.html'>Login</a>";
				} else {
					echo "Password and Confirmation Password do not match!";
				}
				mysqli_close($conn);
				?>
			</p>
			<br>
			<hr>
			<br>
			<p class="infotext">back to <a href="RegisterPage.php">Register</a></p>
		</div>
	</main>
</body>

</html>